* character.c (lisp_string_width): Check for string overflow.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 16 May 2011 05:08:59 +0000 (22:08 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 16 May 2011 05:08:59 +0000 (22:08 -0700)
commit38874eff3070cdcad1d3d835e943ac71ed061d7c
treee2fa81bf29043f60346b40bbc2837e3bf5b7187b
parent1f43ba42ab92a74b65da3f1cbbe66ece82f28de0
* character.c (lisp_string_width): Check for string overflow.

Use EMACS_INT, not int, for string indexes and lengths; in
particular, 2nd arg is now EMACS_INT, not int.  Do not crash if
the resulting string length overflows an EMACS_INT; instead,
report a string overflow if no precision given.  When checking for
precision exhaustion, use a check that cannot possibly have
integer overflow.  (Bug#8675)
* character.h (lisp_string_width): Adjust to new signature.
src/ChangeLog
src/character.c
src/character.h